/**
 *******************************************************************************
 * @brief       Provide a brief description of the module here (Single line).
 * 
 * @author      Ashwin
 * 
 * @file        Platform_Types.h
 * 
 * @version
 * 
 * @date        Jan 28, 2012 11:37:00 PM
 * 
 * @details     Provide a detailed description of the module here (Multi-line).
 * 
 * @pre         Mention any preconditions required to use this module.
 * 
 * @bug         List any bugs in this module.
 * 
 * @note        List any odd modes while using this module.
 * 
 * @warning     List any warnings against using the objects of this module.
 *******************************************************************************
 * @copyright 2012
 * <a href="http://www.afflatustech.com">Afflatus Techtronics</a>
 * and <a href="http://www.ashwinvijayakumar.co.nr">Ashwin Vijayakumar</a>
 * @n@n
 * This work is licensed under the Creative Commons
 * Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy
 * of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or
 * send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain
 * View, California, 94041, USA.
 *******************************************************************************
 */

/**@cond Include guard symbol - Protect against multiple inclusions  @endcond */

#ifndef PLATFORM_TYPES_H_
#define PLATFORM_TYPES_H_

/**@cond ***********************************************************************
 * Add #include "Platform_Types.h" in source files that need access to the below 
 * listed declarations.
 ******************************************************************* @endcond */

/**@cond -----------------------------------------------------------------------
 * Includes section
 * Add all #include here.
 * ----------------------------------------------------------------- @endcond */

/**@cond System headers -------------------------------------------- @endcond */

/**@cond Local headers --------------------------------------------- @endcond */

/**@cond -----------------------------------------------------------------------
 * typedef section (Project scope)
 * Add typedef's with project scope here.
 * Capitalization: Upper_Camel_Case.
 * ----------------------------------------------------------------- @endcond */

/* Standard Boolean Type */
/**
 * @brief Standard Boolean Type.
 * @details This type shall be used as standard API boolean response to decide
 * if a condition was satisfied or not.
 */
typedef enum
{
  FALSE         = 0x00,         /**< Condition not satisfied. */
  TRUE          = 0x01          /**< Condition satisfied. */
} Std_BoolType;

/* Signed Data Type */
/**
 * @brief Signed Data Type.
 * @details These types shall be used to declare signed variables.
 * @note These typedefs have been imported from GenericTypeDefs.h
 * @{
 */
typedef signed int                      int_t;          /**< Signed integer (Processor specific length) */
typedef signed char                     int8_t;         /**< Signed 8-bit integer */
typedef signed short int                int16_t;        /**< Signed 16-bit integer */
typedef signed long int                 int32_t;        /**< Signed 32-bit integer */
/* MPLAB C Compiler for PIC18 does not support 64-bit integers */
#if !defined(__18CXX)
__EXTENSION typedef signed long long    int64_t;        /**< Signed 64-bit integer */
#endif
/**
 * @}
 */

/* Unsigned Data Type */
/**
 * @brief Unsigned Data Type.
 * @details These types shall be used to declare unsigned variables.
 * @note These typedefs have been imported from GenericTypeDefs.h
 * @{
 */
/* UINT is processor specific in length may vary in size */
typedef unsigned int                    uint_t;         /**< Unsigned integer (Processor specific length) */
typedef unsigned char                   uint8_t;        /**< Unsigned 8-bit integer */
typedef unsigned short int              uint16_t;       /**< Unsigned 16-bit integer */
/* 24-bit type only available on C18 */
#if defined(__18CXX)
typedef unsigned short long             uint24_t;       /**< Unsigned 24-bit integer */
#endif
/* other name for 32-bit integer */
typedef unsigned long int               uint32_t;       /**< Unsigned 32-bit integer */
/* MPLAB C Compiler for PIC18 does not support 64-bit integers */
#if !defined(__18CXX)
__EXTENSION typedef unsigned long long  uint64_t;       /**< Unsigned 64-bit integer */
#endif
/**
 * @}
 */

/* AUTOSAR compliant Data Types (Borrowed from arc-stable-90fcfcfda38f)*/
/**
 * @brief AUTOSAR compliant Data Types.
 * @details These types shall be used to declare AUTOSAR compliant variables.
 * @note These typedefs have been borrowed from arc-stable-90fcfcfda38f.
 * @{
 */
#if 0
typedef unsigned long       boolean;
typedef _Bool      boolean;
#endif
typedef signed char         sint8;        
typedef unsigned char       uint8;
typedef char                    char_t;
typedef signed short        sint16;       
typedef unsigned short      uint16;       
typedef signed long         sint32;       
typedef unsigned long       uint32;
typedef unsigned long long  uint64;
typedef unsigned long       uint8_least;  
typedef unsigned long       uint16_least; 
typedef unsigned long       uint32_least; 
typedef signed long         sint8_least;  
typedef signed long         sint16_least; 
typedef signed long         sint32_least; 
typedef float               float32; 
typedef double              float64;  
/**
 * @}
 */

/**@cond -----------------------------------------------------------------------
 * Constants section (Project scope)
 * Add all constants with project scope here.
 * Capitalization: ALL_CAPS.
 * ----------------------------------------------------------------- @endcond */

#define CPU_TYPE            CPU_TYPE_32 
#define CPU_BIT_ORDER       MSB_FIRST 
#define CPU_BYTE_ORDER      HIGH_BYTE_FIRST

/**@cond -----------------------------------------------------------------------
 * Macros section (Project scope)
 * Add all macros with project scope here.
 * Capitalization: ALL_CAPS.
 * ----------------------------------------------------------------- @endcond */

 #define NOP     Nop()

/**@cond -----------------------------------------------------------------------
 * Global variables section (Project scope)
 * Add global variables with project scope here. 
 * Capitalization: lower_case.
 * Declare them with 'extern' keyword.
 * ----------------------------------------------------------------- @endcond */

/**@cond -----------------------------------------------------------------------
 * Function prototypes section (Project scope)
 * Add prototypes for all functions with project scope here. 
 * Capitalization: lower_Camel_Case.
 * ----------------------------------------------------------------- @endcond */

/**@cond -----------------------------------------------------------------------
 * Getter/setter prototype section (Project scope)
 * Add prototypes for getter/setter methods here.
 * Capitalization: get_Camel_Case/is_Camel_Case/set_Camel_Case. 
 * ----------------------------------------------------------------- @endcond */


#endif /* PLATFORM_TYPES_H_ */


/** END OF FILE ********************* Copyright (C) 2012 Afflatus Techtronics */
